<extend name="Layout/application"/>

<block name="css">
   <style>
      .am-form-file {
         position: relative;
         overflow: hidden
      }

      .am-form-file input[type=file] {
         position: absolute;
         left: 0;
         top: 0;
         z-index: 1;
         width: 100%;
         opacity: 0;
         cursor: pointer;
         font-size: 50rem
      }
   </style>
</block>
<block name="content">
   <section class="content-header">
      <h1>
         新增管理员
         <small>Admin create</small>
      </h1>
      <ol class="breadcrumb">
         <li><a href="#"><i class="fa fa-dashboard"></i> Admin</a></li>
         <li class="active">Create</li>
      </ol>
   </section>

   <section class="content" style="width: 70%;">

      <include file="Layout/_flash"/>

      <form class="form-horizontal" method="post" action="{{:url('admins/save')}}">

         <div class="nav-tabs-custom">
            <ul class="nav nav-tabs">
               <li class="active"><a href="#tab1" data-toggle="tab">基本参数</a></li>
               <li class="pull-right"><a href="javascript:history.back(-1)" class="btn btn-sm"
                                         style="padding:10px 2px;"><i class="fa fa-list"></i> 返回</a></li>
            </ul>
            <div class="tab-content">
               <div class="tab-pane active" id="tab1">

                  <div class="box-body">
                     <div class="form-group">
                        <label class="col-sm-2 control-label">用户名</label>
                        <div class="col-sm-10">
                           <input type="text" name="name" class="form-control" placeholder="请输入用户名" value="{{$Request.param.name}}">
                        </div>
                     </div>

                     <div class="form-group">
                        <label class="col-sm-2 control-label">邮箱</label>

                        <div class="col-sm-10">
                           <input type="text" name="email" class="form-control" placeholder="请输入邮箱" value="{{$Request.param.email}}">
                        </div>
                     </div>

                     <div class="form-group">
                        <label class="col-sm-2 control-label">电话</label>
                        <div class="col-sm-10">
                           <input type="text" name="phone" class="form-control" placeholder="请输入手机号" value="{{$Request.param.phone}}"
                                  maxlength="11">
                        </div>
                     </div>

                     <div class="form-group">
                        <label class="col-sm-2 control-label">新密码</label>
                        <div class="col-sm-10">
                           <input type="password" name="password" class="form-control" placeholder="请输入密码">
                        </div>
                     </div>

                     <div class="form-group">
                        <label class="col-sm-2 control-label">确认密码</label>
                        <div class="col-sm-10">
                           <input type="password" name="password_confirm" class="form-control"
                                  placeholder="请确认密码">
                        </div>
                     </div>

                     <div class="form-group">
                        <label class="col-sm-2 control-label">用户组</label>
                        <div class="col-sm-10">

                           <volist name="roles" id="role">
                              <div class="checkbox">
                                 <label>
                                    <input type="checkbox" name="role_id[]" value="{{$role.id}}"> {{$role.name}}
                                 </label>
                              </div>
                           </volist>


                        </div>
                     </div>
                  </div>
                  <div class="box-footer">
                     <button type="reset" class="btn btn-default">重置</button>
                     <button type="submit" class="btn btn-info pull-right">提交</button>
                  </div>

               </div>
            </div>
         </div>
      </form>

   </section>
</block>
